package LanQiao.jichu;

import java.util.Scanner;

//查找整数
public class BASIC_5 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[] arr = new int[n];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = scanner.nextInt();
        }
        int number = scanner.nextInt();
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] == number) {
                System.out.println(i + 1);
                return;
            }
        }
        System.out.println(-1);
    }
}
